<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>

<head>
    <meta charset="UTF-8">
    <title>文明实践所</title>
    <meta name="page-view-size" content="1280*720">
    <link rel="stylesheet" href="../css/base.css">
    <link rel="stylesheet" href="../css/common.css">
    <link rel="stylesheet" href="../css/order.css">
    <script type="text/javascript" src="../lib/js/evm.js"></script>
    <script type="text/javascript" src="../lib/js/Evm_djyw.js"></script>
    <script type="text/javascript" src="../lib/js/key.js"></script>
    <script src="../lib/js/jquery-1.11.1.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="../lib/js/jquery.cookie.js" type="text/javascript" charset="utf-8"></script>
    <script src="../js/api.js" type="text/javascript" charset="utf-8"></script>
    <script src="../js/public.js" type="text/javascript" charset="utf-8"></script>
    <style>
    .list-video.active .list-title{
      background: #D66846;
      color: #fff;
    }
    </style>
</head>

<body>
  <div class="orderList-bg" id="orderListMain">
    <div class="list-bg">
        <div class="list-con" id="list-con">
        </div>
        <div class="page-show" id="page_show">
            <span id="now_page">0</span>
            /
            <span id="total_page">0</span>
        </div>
    </div>
  </div>

</body>
<script>
  TV.structure('文明实践所')

  var modelIndex = {
      disUser: false,
      index: 0,//初始位置
      pageSize: 8,
      type: 3,
      listName: 'list-video', //模块名称
      containerId: 'list-con'//包含模块的标签id
  }    
  function getMessage(page, pageSize, pos, index) {
      var param = {
          page: page,
          pagesize: pageSize,
          id: TV.GetParam("id")?TV.GetParam("id"):877,
          // area_id: $.cookie('TV_CST_AREA'),
          // device: 'tv'
      }
      GetDatas('getArea', param, function (err, res) {
        var mess = res.data;
          var str = '';
          console.log(mess)
          if (mess.items.length > 0) {
            for (var i = 0; i < mess.items.length; i++) {
              var img = '';
              if (!mess.items[i].img) {
                  img = '../images/base.png'
              } else {
                  img = API_URL.imgURL + mess.items[i].img
              }
              str += "<div class='list-video' data-id=" + mess.items[i].id + " data-tpe=" + mess.items[i].tpe + " >";
              //通过数组的方式 将所有的对应项都输出来
            str += '<div class="list-imgBar">'
            str += "<img class='list-img' src=" + img + ">";
            str += '</div>'
            if (mess.items[i].tpe == 5 || mess.items[i].tpe == 4) {
              str += "<div class='listPlay' ><img src='../images/play.png'></div>";
            }
            str += "<div class='list-title'><p class='ell'>" + mess.items[i].title + '</p></div>'
            str += '</div>'
              }
          } else {
              str += '<h1>暂无数据</h1>';
              $('#page_show').css('display', 'none');
          }
          $('#list-con').html(str);
          // $('#page_show').css('display', 'none');
          $('#now_page').html(page)
          $('#total_page').html(mess.totalpage)
          right.index = index ? index : pos == 'previous' ? pageSize - 1 : 0;
          right.initialization();
          right.toggleFocus(right.index);
      })
      // right.toggleFocus();
  }

    function direEnter(status, id, index) {
          window.location.href = 'B_StationList.html?id=' + $('.active').attr('data-id');
    }
</script>
<script type="text/javascript" src="../js/pageList.js"></script>

</html>